s = 'Hello World'
str(s)
#repr:规范字符串输出  rjust：右对齐，左边按指定空格
for x in range(1, 101):
    pass
  #  print(repr(x).rjust(4), repr(x * x).rjust(5), end=' ')
    # 注意前一行 'end' 的使用
   # print(repr(x * x * x).rjust(7), )



# zfill：前边填充0000
print('12'.zfill(5))
num=3.14
print(str(num).zfill(6))
# str.format 用法
print('{}驿站:"{}!"'.format('菜鸟','www.cainiaoyizhan'))
print('{0} 和 {1}'.format('java','py'))
print('{1} 和 {0}'.format('java','py'))
# 关键字
print('{name}:{age}'.format(name='zhangsan',age=18))

table = {'Google': 1, 'Runoob': 2, 'Taobao': 3}
for name, number in table.items():
    print('{0:10} ==> {1:10d}'.format(name, number))
for name, number in table.items():
    print('{0:10} ==> {1:20d}'.format(name, number))